.scroll-down-circle {
  position: absolute;
  background-color: rgb(20, 20, 20);
  left: 50%;
  transform: translateX(-50%);
  top: -56px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  /* top: -70px;
  width: 100px;
  height: 150px;
  border-radius: 30px; */
  z-index: 15;
  box-shadow: 0 0px 20px rgba(0, 0, 0, 1);
  display: flex;
  justify-content: center;
}

.main__action-container {
  display: flex;
  justify-content: center;
}

.main__action {
  position: absolute;
  z-index: 50;
  top: -50px;
}

.main__scroll {
  text-decoration: none;
}

.main__scroll-text {
  color: white;
  user-select: none;
}

.main__action:hover .main__scroll-box {
  animation: scroll-down 3s infinite;
}

/* Animate scroll icon */
@keyframes scroll-down {

  0%,
  100% {
    transform: translateY(0rem);
    opacity: 1;
  }

  35% {
    transform: translateY(1rem);
    opacity: 0;
  }

  70% {
    transform: translateY(-1rem);
    opacity: 0;
  }
}

.radial-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle,rgba(255, 255, 255, 0) 0%, rgba(20, 20, 20, 1) 50%);
}

.portfolio-section-container {
  position: relative;
  z-index: 20;
  overflow: visible;
  box-shadow: 0 0px 20px rgba(0, 0, 0, .5);
}

.portfolio-section {
  background-color: rgb(20, 20, 20);
  position: relative;
  z-index: 40;
}

.portfolio-header {
  z-index: 300;
  position: relative;
}

.portfolio-subheader {
  color: white;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  padding-bottom: 0.5rem;
}

.section-title-container {
  display: flex;
  justify-content: center;
  z-index: 300;
}

.section-title {
  color: white;
  padding: 3rem 0 0 0;
  text-align: center;
  font-size: 6rem;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  z-index: 300;
  position: relative;
}

.portfolio-page {
  position: absolute;
  inset: 0;
  z-index: -1;
  margin: 2rem 0;
}

.image-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 2rem 6rem;
  z-index: 20;
}

.main-pieces {
  aspect-ratio: 1 / 1;
  flex: 0 0 calc(25% - 40px);
  position: relative;
  text-align: center;
}

.main-pieces img {
  width: 101%;
  height: 101%;
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
  top: 50%;
  left: 50%;
  position: absolute;
  transition: 0.2s ease-in-out;
  user-select: none;
  z-index: 0;
  border-radius: 6px;
  transition: filter 0.4s ease, transform 0.4s ease;

  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition:
    opacity 0.5s ease,
    filter 0.4s ease,
    transform 0.4s ease;
}

.main-pieces img:hover {
  filter: grayscale(0%);
  -webkit-filter: grayscale(0%);
  transform: translate(-50%, -50%) scale(1.05);
  z-index: 30;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

.boton-elegante {
  padding: 15px 55px 15px 25px;
  border: 2px solid #2c2c2c;
  background-color: #1a1a1a;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.2s ease;
  outline: none;
  position: absolute;
  overflow: hidden;
  font-weight: bold;
  z-index: 400;
  bottom: 0;
  translate: -50% 50%;
  pointer-events: none;
  white-space: nowrap;
}

.main-pieces:hover .boton-elegante {
  border-color: #666666;
  background: #292929;
  transform: scale(1.05);
  bottom: 5%;
}

.button__icon-wrapper {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  position: absolute;
  color: var(--clr);
  background-color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  right: 8%;
  top: 26%;
  transition: 0.2s ease-in-out;
}

.main-pieces:hover .button__icon-wrapper {
  color: #000;
}

.button__icon-svg--copy {
  position: absolute;
  transform: translate(-150%, 150%);
}

.main-pieces:hover .button__icon-svg:first-child {
  transition: transform 0.3s ease-in-out;
  transform: translate(150%, -150%);
}

.main-pieces:hover .button__icon-svg--copy {
  transition: transform 0.3s ease-in-out 0.1s;
  transform: translate(0);
}

.load-more-button {
  display: block;
  margin: 2rem 0;
  padding: 1rem 2rem;
  font-size: 1.5rem;
  color: white;
  background-color: rgb(70, 70, 70);
  border: 2px solid rgb(70, 130, 180);
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  position: relative;
}

.load-more-button:hover {
  background-color: rgb(70, 130, 180);
}

.load-more-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0 3rem 0;
}



.scrolldown {
  --color: white;
  --sizeX: 30px;
  --sizeY: 50px;
  position: relative;
  width: var(--sizeX);
  height: var(--sizeY);
  margin-left: var(sizeX / 2);
  border: calc(var(--sizeX) / 10) solid var(--color);
  border-radius: 50px;
  box-sizing: border-box;
  margin-bottom: 16px;
  cursor: pointer;
  z-index: 60;
  position: absolute;
  top: -50px;
}

.scrolldown::before {
  content: "";
  position: absolute;
  bottom: 30px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background-color: var(--color);
  border-radius: 100%;
  animation: scrolldown-anim 2s infinite;
  box-sizing: border-box;
  box-shadow: 0px -5px 3px 1px #2a547066;
}

@keyframes scrolldown-anim {
  0% {
    opacity: 0;
    height: 6px;
  }

  40% {
    opacity: 1;
    height: 10px;
  }

  80% {
    transform: translate(0, 20px);
    height: 10px;
    opacity: 0;
  }

  100% {
    height: 3px;
    opacity: 0;
  }
}

.chevrons {
  padding: 6px 0 0 0;
  margin-left: -3px;
  margin-top: 48px;
  width: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chevrondown {
  margin-top: -6px;
  position: relative;
  border: solid var(--color);
  border-width: 0 3px 3px 0;
  display: inline-block;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
}

.chevrondown:nth-child(odd) {
  animation: pulse54012 500ms ease infinite alternate;
}

.chevrondown:nth-child(even) {
  animation: pulse54012 500ms ease infinite alternate 250ms;
}

@keyframes pulse54012 {
  from {
    opacity: 0;
  }

  to {
    opacity: 0.5;
  }
}



@media (min-width: 1351px) {
  .image-container {
    gap: 3rem
  }
}


@media (max-width: 1350px) {
  .image-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 4rem;
  }

  .boton-elegante {
    bottom: 2%;
  }
}

@media (max-width: 650px) {
  .portfolio-header h2 {
    font-size: 3rem;
  }

  .portfolio-subheader {
    font-size: 1.2rem;
    padding: 0 1rem 1rem 8px;
  }

  .image-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 3rem;
    padding: 2rem;
  }
}

.main-pieces img.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.main-pieces img.active {
  filter: grayscale(0%) !important;
  -webkit-filter: grayscale(0%) !important;
  transform: translate(-50%, -50%) scale(1.02);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
  z-index: 30;
}

.main-pieces img.visible:hover {
  transform: translate(-50%, -50%) scale(1.05);
}
